package com.water.service.staticservice;

import com.water.service.IService;

/**
 * @author wsj
 * @version 1.0
 * @description: TODO
 * @date 2022/1/9 13:02
 */
//这是一级代理-日志
public class ProxyLogService implements IService {
    private IService proxyTranService;


    public ProxyLogService(IService proxyTranService) {
        this.proxyTranService = proxyTranService;
    }

    @Override
    public void add() {
        try{
            System.out.println("===开始日志======");
            proxyTranService.add();//二级代理执行核心业务
        }catch (Exception e){
            System.out.println("======日志====");
        }
        System.out.println("======结束日志====");
    }
}
